/**
 * MediaWiki style sheet for general styles on complex content
 *
 * Styles for complex things which are a standard part of page content
 * (ie: the CSS classing built into the system), like the TOC.
 */

/* stylelint-disable selector-class-pattern */

/* Table of Contents */
.toc,
.mw-warning,
.toccolours {
	border: 1px solid #a2a9b1;
	background-color: #f8f9fa;
	padding: 5px;
	font-size: 95%;
}

/**
 * We want to display the ToC element with intrinsic width in block mode. The fit-content
 * value for width is however not supported by large groups of browsers.
 *
 * We use display:table. Even though it should only contain other table-* display
 * elements, there are no known problems with using this.
 */
.toc {
	display: table;
	padding: 7px;
}

/* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */
table.toc {
	border-collapse: collapse;
}

/* Remove additional paddings inside table-cells that are not present in <div>s */
table.toc td {
	padding: 0;
}

.toc h2 {
	display: inline;
	border: 0;
	padding: 0;
	font-size: 100%;
	font-weight: bold;
}

.toc .toctitle {
	text-align: center;
}

.toc ul {
	list-style-type: none;
	list-style-image: none;
	margin-left: 0;
	padding: 0;
	text-align: left;
}

.toc ul ul {
	margin: 0 0 0 2em;
}

/* Separate columns for tocnumber and toctext */
.tocnumber,
.toctext {
	display: table-cell;
	/*
	 * Text decorations are not propagated to the contents of inline blocks and inline tables,
	 * according to <https://www.w3.org/TR/css-text-decor-3/#line-decoration>, and 'display: table-cell'
	 * generates an inline table when used without any parent table-rows and tables.
	 */
	text-decoration: inherit;
}

/* Space between the columns for tocnumber and toctext */
.tocnumber {
	color: #202122;
	padding-left: 0;
	padding-right: 0.5em;
}
/* @noflip */
.mw-content-ltr .tocnumber {
	padding-left: 0;
	padding-right: 0.5em;
}

/* @noflip */
.mw-content-rtl .tocnumber {
	padding-left: 0.5em;
	padding-right: 0;
}

/* Warning */
.mw-warning {
	margin-left: 50px;
	margin-right: 50px;
	text-align: center;
}

/* Images */
/* @noflip */
div.floatright,
table.floatright {
	margin: 0 0 0.5em 0.5em;
}

/* @noflip */
div.floatleft,
table.floatleft {
	margin: 0 0.5em 0.5em 0;
}

/* Thumbnails */
div.thumb {
	margin-bottom: 0.5em;
	width: auto;
	background-color: transparent;
}

div.thumbinner {
	border: 1px solid #c8ccd1;
	padding: 3px;
	background-color: #f8f9fa;
	font-size: 94%;
	text-align: center;
	/* new block formatting context,
	 * to clear background from floating content */
	overflow: hidden;
}

html .thumbimage {
	background-color: #fff;
	border: 1px solid #c8ccd1;
}

html .thumbcaption {
	border: 0;
	line-height: 1.4em;
	padding: 3px;
	font-size: 94%;
	/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
	text-align: left;
}

.magnify {
	/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
	float: right;
	margin-left: 3px;
}

.magnify a {
	display: block;
	/* Hide the text… */
	text-indent: 15px;
	white-space: nowrap;
	overflow: hidden;
	/* …and replace it with the image */
	width: 15px;
	height: 11px;
	/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */

	/* Use same SVG support hack as mediawiki.legacy's shared.css */
	background-image: url( images/magnify-clip-ltr.png );
	background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
	/* Don't annoy people who copy-paste everything too much */
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

img.thumbborder {
	border: 1px solid #eaecf0;
}

/* Directionality-specific styles for thumbnails - their positioning depends on content language */

/* @noflip */
.mw-content-ltr .thumbcaption {
	text-align: left;
}

/* @noflip */
.mw-content-ltr .magnify {
	float: right;
	margin-left: 3px;
	margin-right: 0;
}

/* @noflip */
.mw-content-ltr .magnify a {
	/* Use same SVG support hack as mediawiki.legacy's shared.css */
	background-image: url( images/magnify-clip-ltr.png );
	background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
}

/* @noflip */
.mw-content-rtl .thumbcaption {
	text-align: right;
}

/* @noflip */
.mw-content-rtl .magnify {
	float: left;
	margin-left: 0;
	margin-right: 3px;
}

/* @noflip */
.mw-content-rtl .magnify a {
	/* Use same SVG support hack as mediawiki.legacy's shared.css */
	background-image: url( images/magnify-clip-rtl.png );
	background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-rtl.svg );
}

/* @noflip */
div.tright {
	margin: 0.5em 0 1.3em 1.4em;
}

/* @noflip */
div.tleft {
	margin: 0.5em 1.4em 1.3em 0;
}

/* Hide elements that are marked as "empty" according to legacy Tidy rules,
 * except if a client script removes the mw-hide-empty-elt class from the body
 */
body.mw-hide-empty-elt .mw-empty-elt {
	display: none;
}
